package com.sx.manage.controller.company;
 
import javax.annotation.Resource;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.sx.manage.controller.base.MBaseController;
import com.sx.manage.service.company.send.MComCollectSendRecordWebService;
import com.sx.manage.servlet.ViewAndModel;
import com.sx.model.manage.mybatis.form.company.MCompanyInfoCollectSendRecordForm;
import com.sx.model.manage.mybatis.vo.company.MCompanyInfoCollectSendRecordVO;
import com.sx.model.manage.mybatis.vo.result.ResultBooleanVO;
import com.sx.model.manage.mybatis.vo.result.ResultListVO;
/**
  *公司信息录入url发送记录(18年7月2日， 功能没有使用)
  *@author Administrator
  *@version 1.0.0 Wed Jul 26 00:00:00 CST 2017 
  */
@Controller
@RequestMapping("/company_send")
public class MCompanyInfoCollectSendRecordController  extends MBaseController{ 
	/*** 日志*/ 
	private Logger _log = LoggerFactory.getLogger(this.getClass());
	//公司信息录入发送记录webService
	@Resource (name="comCollectSendRecordWebService")
	private MComCollectSendRecordWebService comCollectSendRecordWebService;
	
	public MComCollectSendRecordWebService getComCollectSendRecordWebService() {
		return comCollectSendRecordWebService;
	}

	public void setComCollectSendRecordWebService(
			MComCollectSendRecordWebService comCollectSendRecordWebService) {
		this.comCollectSendRecordWebService = comCollectSendRecordWebService;
	}

	/**数据列表列表*/ 
  	@RequestMapping(value="list_view")
 	public ViewAndModel list_view ( MCompanyInfoCollectSendRecordForm form  ){ 
  		_log.debug("列表方法调用");
   		ViewAndModel modelView = new ViewAndModel(request,cache); 
 				 	 modelView.setViewName("company/collect/company_collect_list") ; 
  		return modelView; 
	}

	/**数据保存*/ 
 	@RequestMapping(value="save") 
     @ResponseBody 
 	public  ResultBooleanVO save( MCompanyInfoCollectSendRecordForm form ,BindingResult errors){ 
 		_log.debug("保存方法调用");
 		String error = this.fieldValidate(form, errors);
 		if( null != error){
 			return new  ResultBooleanVO(false,null,error); 
 		}
 		return comCollectSendRecordWebService.save( form,loginConsumer()); 
 	}
	/**数据保存*/ 
 	@RequestMapping(value="again") 
    @ResponseBody 
 	public  ResultBooleanVO again(Long id){ 
 		_log.debug("保存方法调用");
 		return comCollectSendRecordWebService.again( id,loginConsumer()); 
 	}
 	

 	/**翻页信息获取*/
 	@RequestMapping(value="page")
 	@ResponseBody
 	public ResultListVO<MCompanyInfoCollectSendRecordVO> page(MCompanyInfoCollectSendRecordForm form){
 		_log.debug("翻页方法调用");
 		return comCollectSendRecordWebService.queryPage(form);
 	}


 
} //end class